package com.gxuwz.zhangjiahui.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxuwz.zhangjiahui.entity.Leader;
import com.gxuwz.zhangjiahui.entity.Student;
import com.gxuwz.zhangjiahui.mapper.LeaderMapper;
import com.gxuwz.zhangjiahui.mapper.StudentMapper;
import com.gxuwz.zhangjiahui.service.ILeaderService;
import com.gxuwz.zhangjiahui.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhangjiahui
 * @since 2021-06-20
 */
@Service
public class LeaderServiceImpl extends ServiceImpl<LeaderMapper, Leader> implements ILeaderService {

    @Autowired
    private LeaderMapper leaderMapper;

    @Override
    public Leader findLeaderById(Leader leader) {
        return leaderMapper.findLeaderById(leader);
    }

    @Override
    public List<Leader> findLeaderAll() {
        return leaderMapper.findLeaderAll();
    }

    @Override
    public IPage<Leader> selectLeaderPage(Page<Leader> page, Wrapper<Leader> wrapper) {
        return leaderMapper.selectLeaderPage(page, wrapper);
    }

    @Override
    public void addLeader(Leader leader) {
        leaderMapper.addLeader(leader);
    }

    @Override
    public void updateLeaderById(Leader leader) {
        leaderMapper.updateLeaderById(leader);
    }

    @Override
    public void deleteLeaderById(Leader leader) {
        leaderMapper.deleteLeaderById(leader);
    }
}
